﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>调课审核</title>
    <link rel="stylesheet" type="text/css" href="/ViewMob/css/bootstrap3.3.5/css/bootstrap.css">
    <link rel="stylesheet" href="/ViewMob/css/elem/index.css">
    <link href="/ViewMob/js/layer/need/layer.css" rel="stylesheet" />
    <script src="/ViewMob/js/layer/layer.m.js"></script>
    <style>
        .el-input input {
            height: 32px !important;
            border: 0PX !important;
        }

        .el-select-dropdown__item {
            height: auto !important;
            /*border-bottom: 1px solid #eef1f7;*/
        }
    </style>
</head>

<body ontouchstart>

    <div id="app">
        <div style="text-align:center;text-align: center;padding: 10px 20px;font-size: 20px;display:none">
            调课审核
        </div>

        <el-tabs v-model="activeName" style="padding:10px 20px;">
            <el-tab-pane label="待审数据" name="first">
                <el-row>
                    <el-alert :title="'共计找到'+dtkdata.length+'条记录'" type="success" :closable="false">
                    </el-alert>
                    <el-col :span="24">
                        <el-card shadow="always" v-for="item in dtkdata" style="margin-top:10px;">
                            <div>

                                <span>
                                    <img src="/ViewMob/Images/personhead.png" style="height:34px;width:34px" />
                                    <span style="margin-left:5px;font-weight:bolder">
                                        {{item.sqrmc}}
                                    </span>
                                </span> <span style="float:right;color:cornflowerblue"><el-tag type="success">{{item.xbmc}}</el-tag></span>
                            </div>
                            <!--<div style="margin-top:10px">
                                <span>调课原因：{{item.sqly}}</span>
                            </div>-->
                            <div style="margin-top:10px">
                                <span>申请详情：{{item.sqxx}}</span>
                            </div>
                            <el-button type="primary" size="small" style="margin-top:5px" @click="ty(item,'1')">同意</el-button>
                            <el-button type="danger" size="small" style="margin-top:5px;margin-left:15px" @click="bty(item,'0')">不同意</el-button>

                        </el-card>
                    </el-col>
                </el-row>
            </el-tab-pane>
            <el-tab-pane label="已审数据" name="second">
                <el-row>
                    <el-alert :title="'共计找到'+ytkdata.length+'条记录'" type="success" :closable="false">
                    </el-alert>
                    <el-col :span="24">
                        <el-card shadow="always" v-for="item in ytkdata" style="margin-top:10px">
                            <div>

                                <span>
                                    <img src="/ViewMob/Images/personhead.png" style="height:34px;width:34px" />
                                    <span style="margin-left:5px;font-weight:bolder">
                                        {{item.sqrmc}}
                                    </span>
                                </span> <span style="float:right;color:cornflowerblue"><el-tag type="success">{{item.xbmc}}</el-tag></span>
                            </div>
                            <!--<div style="margin-top:10px">
                                <span>调课原因：{{item.sqly}}</span>
                            </div>-->
                            <div style="margin-top:10px">
                                <span>申请详情：{{item.sqxx}}</span>
                            </div>
                            <div style="margin-top:10px">
                                <span>审核意见：{{item.yhshjl}},{{item.yhshjg}}</span>
                            </div>

                        </el-card>
                    </el-col>
                </el-row>
            </el-tab-pane>

        </el-tabs>
        <el-dialog title="审核调课"
                   :visible.sync="dialogVisible"
                   width="90%">
            <span>{{isty=='1'?'同意':'不同意'}}</span>
            <el-input type="textarea"
                      :autosize="{ minRows: 2, maxRows: 4}"
                      placeholder="请输入意见"
                      v-model="shyj">
            </el-input>
            <span slot="footer" class="dialog-footer">
                <el-button @click="dialogVisible = false">取 消</el-button>
                <el-button type="primary" @click="onSubmit">确  认</el-button>
            </span>
        </el-dialog>
    </div>
    <script src="/ViewMob/js/jquery-1.11.1.min.js"></script>
    <script src="/ViewMob/js/vue.js"></script>
    <script src="/ViewMob/js/lodash.min.js"></script>
    <script src="/ViewMob/css/elem/index.js"></script>
    <script type="text/javascript" src="/ViewMob/js/ComFunJS.js?V=3"></script>

    <script>
        $(function () {

        })

    </script>
    <script>
        var app = new Vue({
            el: '#app',
            data: {
                xq: "",
                username: "",
                isty: "1",
                xmid: "0",
                dialogVisible: false,
                activeName: "first",
                shyj: "",
                dtkdata: [],//待调课数据
                ytkdata: [],
                form: {
                    glz: "",
                    sjsm: ""

                }

            },

            methods: {
                cancalReadOnly(onOff) {
                    this.$nextTick(() => {
                        if (!onOff) {
                            //const { select } = this.$refs;
                            //const input = select.$el.querySelector('.el-input__inner');
                            //input.removeAttribute('readonly');
                        }
                    });
                },

                ty: function (item, type) {
                    this.xmid = item.xmid;
                    this.dialogVisible = true;
                    this.isty = type;
                },
                bty: function (item, type) {
                    this.xmid = item.xmid;
                    this.dialogVisible = true
                    this.isty = type;

                },
                query: function () {
                    var pro = this;
                    $.getJSON("/API/VIEWAPI.ashx?Action=CX_GETTKSH&r=" + Math.random(), {}, function (r) {
                        if (r.ErrorMsg == "") {
                            pro.dtkdata = r.Result;
                            pro.ytkdata = r.Result1;
                        }
                    })
                },
                onSubmit: function () {
                    var pro = this;
                    $.getJSON("/API/VIEWAPI.ashx?Action=CX_SHTK&r=" + Math.random(), { xmid: pro.xmid, shlb: pro.isty, shyj: pro.shyj }, function (r) {
                        if (r.ErrorMsg == "") {
                            pro.$message({
                                type: 'info',
                                message: '操作成功'
                            });
                            pro.dialogVisible = false;
                            pro.query();

                        }
                    })
                }
            },
            mounted: function () {
                var pro = this;
                pro.$nextTick(function () {
                    pro.query();

                })
            },
            watch: {


            }


        })


    </script>
</body>
</html>
